<template>
	<view>
		<!-- <u-navbar :is-back="true" :is-fixed="true" title="政策资讯详情"></u-navbar> -->
		<view class="font-12 pl-2 pt-2 text-999999 ">来源：{{newlist.source}}</view>
		<view class="font-12 pl-2 pt-2 text-999999">标题：{{newlist.title}}</view>
		<view class="font-12 pl-2 pt-2 text-999999 ">时间：{{newlist.releaseTime}}</view>
		<view class="pl-2 pr-2 mt-6 pb-2">
			<view class="text-center pb-2 font-weight-bold font-16">{{newlist.title}}</view>
			<u-parse :html="newlist.content"></u-parse>
		</view>
	</view>
</template>

<script>
	import $H from '@/common/free-lib/request.js';
	import {
		getImageUrl
	} from '@/common/free-lib/util.js';
	export default {
		data() {
			return {
				newlist: '',
			}
		},
		onLoad(options) {
			// 从options中获取传递的id参数
			const id = options.id;
			this.NewListDetail(id)
		},
		computed: {
			richTextNodes() {
				return this.parseHTML(this.htmlContent);
			}
		},
		methods: {
			getFullImageUrl(imagePath) {
				return getImageUrl(imagePath);
			},
			NewListDetail(id) {
				$H.get('/basisInform/policyRelease/queryById', {
					id: id
				}, {}).then(res => {
					this.newlist = res.result
				}).catch(error => {
					uni.showToast({
						title: "网络错误，请稍后再试",
						icon: 'none'
					});
				});
			},
		}
	}
</script>

<style>
</style>